The present invention relates generally to image processing systems and, more particularly, to methods and systems for detecting edges, lines and shapes within images.
Edge detection is a technique used to, among other things, segment images in image processing applications. An edge of an image may be defined by, for example, the degree of change in intensity between a first region of pixels and second region of pixels. Along the boundary between the two regions, a group of pixels on either side may be classified as edge pixels. The classification of pixels as belonging to an edge has many applications in image processing, e.g., image enhancement and pattern recognition which can be used in optical character recognition (OCR) applications. Such applications typically depend upon the success of the edge detection process in order to achieve acceptable output quality.
One approach for performing edge detection is to consider an edge as a change in the intensity level (luminance) from one pixel or region to another. In addition to computing the change(s) in intensity level using, e.g., a gradient, an edge detector typically employs a threshold value that indicates whether a given intensity value change can be classified as representing an edge or non-edge region or pixel. A comparison between the threshold and a measured intensity change is used to determine whether a pixel belongs to an edge or not. Most threshold-based edge detectors use a predetermined threshold value that is fixed for an entire image and which may also be applied to every image generated by a particular imaging device or process. Using a high threshold value in edge detection is problematic when confronted with low contrast areas within the image being processed. For example, consider an image being processed which has a shadowed region and another region which receives more direct lighting (non-shadowed). Both the shadowed region and the non-shadowed region contain the same edge feature. In the shadowed region, the measured pixel luminance values will typically reflect less change in intensity than corresponding pixel measurements in the non-shadowed region, since the measured intensity values will be in a lower and narrower range than the measured intensity values for the same edge feature in the non-shadowed region. As a result, if a high threshold value is used, edge features present in low contrast regions of the image may be erroneously classified as non-edge features.
In addition to edge detection, some image processing applications also perform line detection. Lines can, for example, be considered higher level elements and, once identified, can be used to identify shapes within the image. One technique which can be used to perform line detection is the Hough transform. The Hough transform can detect a line representing an object boundary despite the presence of surrounding noise in the image. The Hough transform assigns a locus curve to the (i,j) coordinates of each pixel value having an intensity which corresponds to that of a line condition. The locus curve for each of these pixels corresponds to a polar coordinate transformation of the (i,j) coordinates for each such pixel. A line used to represent the boundary in the image is then obtained by finding the polar coordinates of a point where the curves representing the loci concentrate. However, conventional implementations of the Hough transform do not fully utilize edge strength and orientation.